<template>
    <!-- component/goods/goods.wxml style-small/style-list -->
    <view :class="'goods-list ' + style">
        <block v-for="(item, idx) in PList" :key="idx">
            <view class="good-inner">
                <navigator class="navi" :url="'/pages/proDetail/proDetail?Ftype=3&Ftypeid=' + item.Fid" hover-class="none">
                    <image mode="aspectFill" class="pro_pic" :src="item.Fhimg"></image>
                    <view class="goods-desc">
                        <view class="goods-title">{{ item.Fsummary }}</view>
                        <view class="goods-info">
                            <text class="goods-price">
                                <text>￥</text>
                                <text czlass="good-lowprice">{{ item.Flowprice }}</text>
                            </text>
                            <text class="goods-sale">已售{{ item.Fpersonnum }}</text>
                        </view>
                    </view>
                </navigator>
            </view>
        </block>
    </view>
</template>

<script>
// component/goods/goods.js
export default {
    data() {
        return {
            prop: null,
            PList: [],
            style: 'style-small'
        };
    },
    /**
     * 组件的属性列表
     */
    props: {
        con: {
            type: Object
        }
    },
    mounted() {
        // 处理小程序 ready 生命周期
        this.$nextTick(() => this.ready());
    },
    /**
     * 组件的方法列表
     */
    methods: {
        ready: function () {
            var that = this;
            var prop = JSON.parse(that.con.prop);
			that.prop = prop;
			that.PList = that.con.PList;
			that.style = 'style-' + prop.size; 
        }
    },
    created: function () {}
};
</script>
<style>
@import './goods.css';
</style>
